package org.nanotek.dao.spring.impl;

import java.util.List;

import org.nanotek.beans.ArtistAlias;
import org.nanotek.dao.spring.ArtistAliasDAO;
import org.springframework.stereotype.Repository;

@Repository
@SuppressWarnings("serial")
public class ArtistAliasDAOImpl extends GeneralPurposeDAO implements ArtistAliasDAO<ArtistAlias>{

	public ArtistAlias findById (Long id)
	{ 
		return (ArtistAlias) getHibernateTemplate().get(clazz, id);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ArtistAlias> findByKeyId(Long nameId) {
		ArtistAlias artistCredit = new ArtistAlias();
		artistCredit.setNameId(nameId);
		return  (List<ArtistAlias>) getHibernateTemplate().
				findByExample(artistCredit);
	}

}
